/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "far_bodega")
@NamedQueries({
    @NamedQuery(name = "FarBodega.findAll", query = "SELECT f FROM FarBodega f")})
public class FarBodega implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "fbo_id")
    private Integer fboId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 64)
    @Column(name = "fbo_nombre")
    private String fboNombre;
    @Size(max = 2147483647)
    @Column(name = "fbo_descripcion")
    private String fboDescripcion;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fbo_estado")
    private int fboEstado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fbo_is_ingreso")
    private int fboIsIngreso;
    @OneToMany(mappedBy = "farBodega", fetch = FetchType.LAZY)
    private List<FarStock> farStockList;
    @OneToMany(mappedBy = "farBodega", fetch = FetchType.LAZY)
    private List<FarKardexEncabezado> farKardexEncabezadoList;

    public FarBodega() {
    }

    public FarBodega(Integer fboId) {
        this.fboId = fboId;
    }

    public FarBodega(Integer fboId, String fboNombre, int fboEstado, int fboIsIngreso) {
        this.fboId = fboId;
        this.fboNombre = fboNombre;
        this.fboEstado = fboEstado;
        this.fboIsIngreso = fboIsIngreso;
    }

    public Integer getFboId() {
        return fboId;
    }

    public void setFboId(Integer fboId) {
        this.fboId = fboId;
    }

    public String getFboNombre() {
        return fboNombre;
    }

    public void setFboNombre(String fboNombre) {
        this.fboNombre = fboNombre;
    }

    public String getFboDescripcion() {
        return fboDescripcion;
    }

    public void setFboDescripcion(String fboDescripcion) {
        this.fboDescripcion = fboDescripcion;
    }

    public int getFboEstado() {
        return fboEstado;
    }

    public void setFboEstado(int fboEstado) {
        this.fboEstado = fboEstado;
    }

    public int getFboIsIngreso() {
        return fboIsIngreso;
    }

    public void setFboIsIngreso(int fboIsIngreso) {
        this.fboIsIngreso = fboIsIngreso;
    }

    public List<FarStock> getFarStockList() {
        return farStockList;
    }

    public void setFarStockList(List<FarStock> farStockList) {
        this.farStockList = farStockList;
    }

    public List<FarKardexEncabezado> getFarKardexEncabezadoList() {
        return farKardexEncabezadoList;
    }

    public void setFarKardexEncabezadoList(List<FarKardexEncabezado> farKardexEncabezadoList) {
        this.farKardexEncabezadoList = farKardexEncabezadoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fboId != null ? fboId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FarBodega)) {
            return false;
        }
        FarBodega other = (FarBodega) object;
        if ((this.fboId == null && other.fboId != null) || (this.fboId != null && !this.fboId.equals(other.fboId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.FarBodega[ fboId=" + fboId + " ]";
    }
    
}
